package com.yunchao.eeprint.handler;

import com.yunchao.eeprint.entity.FORM.PlatformLoginFORM;
import com.yunchao.eeprint.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginHandler {

    @Autowired
    private LoginService loginService;

    @PostMapping("/platform/open/user/login")
    public void platformLogin(@RequestBody PlatformLoginFORM platformLoginFORM){
        System.out.println(platformLoginFORM.toString());
        loginService.platformLogin(platformLoginFORM.getUserPhone(), platformLoginFORM.getUserPassword());
    }

}
